using System;
using System.Data;
using TimeSheetDAL;

namespace TimeSheetBLL
{

	[TableAttribute("projectstatus")]
	[PrimaryKeyAttribute("status_id", "ID")]
	[ColumnAttribute("status_name", "Name")]
	[ColumnAttribute("is_visible", "IsVisible")]

	public class ProjectStatus : IDBEntity
	{

		private string name;
		private bool isVisible;
		private long iD;

		public ProjectStatus()
		{
			this.isVisible = true;
		}

		public DataTable GetProjects()
		{
			DBFacade dbf = new DBFacade();
			return dbf.GetProjectsByStatusID( this.iD );
		}

		#region Generated

		public long ID
		{

			get
			{
				return this.iD;
			}set
			 {
				 this.iD = value; 
			 }
		}

		public bool IsVisible
		{
			get{ return this.isVisible; }
			set{ this.isVisible = value; }
		}

		public string Name
		{

			get
			{
				return this.name;
			}set
			 {
				 this.name = value; 
			 }
		}

		#endregion

	}//class
}//namespace